﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LinQModel.Abstract;
using LinQModel.Entities;
using System.Data.Linq;

namespace LinQModel.Concrete
{
    public class SQLStudentsRepository : IStudentsRepository 
    {
        private Table<Student> studentsTable;
        public SQLStudentsRepository(string connectionString)
        {
            studentsTable = (new DataContext(connectionString)).GetTable<Student>();
        }

        public IQueryable<Student> Students
        {
            get { return studentsTable; }
        }
    }
}
